<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>判断http status</title>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	</head>
	<body>
		<script type="text/javascript">
			$.ajax({
				type:"get",
				url:"http://localhost:8084/ssm/http/400",
				async:true
			}).done(function(r){
				console.info(400);
				console.log(r);
			}).fail(function(jqxhr,text,err){
				console.info(400);
				console.log(arguments);
			});
			$.ajax({
				type:"get",
				url:"http://localhost:8084/ssm/http/403",
				async:true
			}).done(function(r){
				console.info(403);
				console.log(r);
			}).fail(function(jqxhr,text,err){
				console.info(403);
				console.log(arguments);
			});
			$.ajax({
				type:"get",
				url:"http://localhost:8084/ssm/http/500",
				async:true
			}).done(function(r){
				console.info(500);
				console.log(r);
			}).fail(function(jqxhr,text,err){
				console.info(500);
				console.log(arguments);
			});
			$.ajax({
				type:"get",
				url:"http://localhost:8084/ssm/http/ok",
				async:true
			}).done(function(r){
				console.info('ok');
				console.log(r);
			}).fail(function(jqxhr,text,err){
				console.info('ok');
				console.log(arguments);
			});
			$.ajax({
				type:"get",
				url:"http://localhost:8084/ssm/http/wait",
				async:true,
				timeout:5000
			}).done(function(r){
				console.info('wait');
				console.log(r);
			}).fail(function(jqxhr,text,err){
				console.info('wait');
				console.log(arguments);
			});
			$.ajax({
				type:"get",
				url:"http://localhost:8084/ssm/http/timeout",
				async:true,
				timeout:5000
			}).done(function(r){
				console.info('timeout');
				console.log(r);
			}).fail(function(jqxhr,text,err){
				console.info('timeout');
				console.log(arguments);
			});
		</script>
	</body>
</html>
